<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

class Article extends Model
{

    //1。关联的表

    public $table = 'article';

    //2.主键
    public $primaryKey = 'art_id';

    //3.允许批量操作的字段
    public $guarded = [];

    //是否维护 create_at 和 update_at
    public $timestamps = false;

    public function cate()
    {
        return $this->belongsTo('App\Model\Cate','cate_id','cate_id');
    }
}
